 
namespace Telerik.Web.Mvc.UI
{
    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Web;
    using System.Web.Mvc;



    public interface IHtmlNode<T> : IHtmlNode where T : IHtmlNode
    {


        new string TagName
        {
            get;
        }

        new string InnerHtml
        {
            get;
        }

        new TagRenderMode RenderMode
        {
            get;
        }

        new IList<IHtmlNode> Children
        {
            get;
        }

        new IDictionary<string, string> Attributes();

        new string Attribute(string key);

        new T Attribute(string key, string value);

        new T Attribute(string key, string value, bool replaceExisting);

        new T Attributes<TKey, TValue>(IDictionary<TKey, TValue> attributes);

        new T Attributes(object attributes);

        new T Attributes<TKey, TValue>(IDictionary<TKey, TValue> attributes, bool replaceExisting);

        new T AddClass(params string[] classes);

        new T PrependClass(params string[] classes);

        new T ToggleClass(string @class, bool condition);

        new T ToggleAttribute(string key, string value, bool condition);

        new T ToggleCss(string key, string value, bool condition);

        new T Template(Action<TextWriter> value);

        new T Css(string key, string value);

        new Action<TextWriter> Template();

        new T Html(string value);

        new T Text(string value);

        new void WriteTo(TextWriter output);

        new T AppendTo(IHtmlNode parent);

        T AddChild<TSource>(Func<TSource> child) where TSource : T; 
    }

    public interface IHtmlNode:IHtmlString
    {
        string TagName
        {
            get;
        }

        string InnerHtml
        {
            get;
        }

        TagRenderMode RenderMode
        {
            get;
        }

        IList<IHtmlNode> Children
        {
            get;
        }

        IDictionary<string, string> Attributes();

        string Attribute(string key);

        IHtmlNode Attribute(string key, string value);

        IHtmlNode Attribute(string key, string value, bool replaceExisting);

        IHtmlNode Attributes<TKey, TValue>(IDictionary<TKey, TValue> attributes);

        IHtmlNode Attributes(object attributes);

        IHtmlNode Attributes<TKey, TValue>(IDictionary<TKey, TValue> attributes, bool replaceExisting);

        IHtmlNode AddClass(params string[] classes);

        IHtmlNode PrependClass(params string[] classes);

        IHtmlNode ToggleClass(string @class, bool condition);

        IHtmlNode ToggleAttribute(string key, string value, bool condition);

        IHtmlNode ToggleCss(string key, string value, bool condition);

        IHtmlNode Template(Action<TextWriter> value);

        IHtmlNode Css(string key, string value);

        Action<TextWriter> Template();

        IHtmlNode Html(string value);

        IHtmlNode Text(string value);

        void WriteTo(TextWriter output);

        IHtmlNode AppendTo(IHtmlNode parent);



    }
}
